/**
 * Created by MGL on 2017/2/25.
 */
public class Test1 {

    public int JumpFloor(int target) {
        if (target <= 0) return 0;
        if (target == 1) return 1;
        if (target == 2) return 2;
        int one = 1;
        int two = 2;
        int result = 0;
        for (int i = 2; i < target; i++) {
            result = one + two;
            one = two;
            two = result;
        }
        return result;
    }

    public static void main(String[] args) {
        Test1 test1 = new Test1();
        System.out.println(test1.JumpFloor(20));
    }
}
